package controller

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

// Hellow godoc
// @Summary hellow
// @Description do ping
// @Accept json
// @Produce json
// @Success 200 {string} string "pong"
// @Failure 400 {string} string "ok"
// @Failure 404 {string} string "ok"
// @Failure 500 {string} string "ok"
// @Router /welcome [get]
func Hellow(c *gin.Context) {
	c.String(http.StatusOK, "hellow")
}



// ListAccounts godoc
// @Summary List accounts
// @Description get accounts
// @Accept  json
// @Produce  json
// @Param q query string false "name search by q"
// @Header 200 {string} Token "qwerty"
// @Failure 400,404 {string} string
// @Router /accounts [get]
func ListAccounts(ctx *gin.Context) {
	q := ctx.Request.URL.Query().Get("q")
	ctx.JSON(http.StatusOK, q)
}